package com.woniu;

import com.woniu.Result;
import com.woniu.dto.ComplainDto;
import com.woniu.pojo.Complaint;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "complain-service",path = "/complain")
public interface ComplainFeignClient {

    @ApiOperation("提交投诉")
    @PostMapping("/other")
    public Result<Boolean> submitComplainByDto(@RequestBody ComplainDto dto);

    @ApiOperation("通过orderId查找投诉")
    @GetMapping("/{orderId}")
    public Result<Complaint> getByOrderId(@PathVariable("orderId") Integer orderId);

    @ApiOperation("修改")
    @PostMapping
    public Result update(@RequestBody Complaint complaint);
}
